package DAL.DTO;

public class EmployeDTO extends PersonneDTO{
        private String matricule;
        private String password;
        private RoleDTO role;
    
        public EmployeDTO(  String matricule, String nom, String prenom, String rue, 
                            String numero, int codePostal, String ville, String pays,
                            ZoneGeographiqueDTO zone, String telephone, String email,
                            boolean gestionClient, boolean gestionIntervention, 
                            boolean gestionPlanning, boolean gestionDirection, 
                            boolean gestionOnSite, boolean gestionSys,
                            String password) {
                super(  nom, prenom, rue, numero, codePostal, ville, pays, zone, 
                        telephone, email);
                this.role = new RoleDTO(gestionClient, gestionIntervention, 
                                        gestionPlanning, gestionDirection, 
                                        gestionOnSite, gestionSys);
                this.matricule = matricule;
                this.password = password;
                //throw new UnsupportedOperationException("Not yet implemented");
        }
  
        public EmployeDTO(  String nom, String prenom, String rue, 
                            String numero, int codePostal, String ville, String pays,
                            ZoneGeographiqueDTO zone, String telephone, String email,
                            boolean gestionClient, boolean gestionIntervention, 
                            boolean gestionPlanning, boolean gestionDirection, 
                            boolean gestionOnSite, boolean gestionSys,
                            String password) {
                super(  nom, prenom, rue, numero, codePostal, ville, pays, zone, 
                        telephone, email);
                this.role = new RoleDTO(gestionClient, gestionIntervention, 
                                        gestionPlanning, gestionDirection, 
                                        gestionOnSite, gestionSys);
                this.password = password;
        }
        
        //Setters
        public void setMatricule(String matricule) {
                UTIL.Util.checkString(matricule);
                this.matricule = matricule;
        }

        public void setPassword(String password) {
                UTIL.Util.checkString(password);
                this.password = password;
        }

        public void setRole(RoleDTO role) {
                UTIL.Util.checkObject(role);
                this.role = role;
        }

        //Getters
        public String getMatricule() {
                return matricule;
        }

        public String getPassword() {
                return password;
        }

        public RoleDTO getRole() {
                return role;
        }
}